<?php

Yii::setAlias('@tests', dirname(__DIR__) . '/tests');

$components = require(__DIR__ . '/components.php');
$params = require(__DIR__ . '/params.php');
$apps = require(__DIR__ . '/apps.php');

return [
    'id' => 'console',
    'timeZone' => 'Asia/Chongqing',
    'language' => 'zh-CN',
    'charset' => 'utf-8',
    'basePath' => dirname(__DIR__),
    'preload' => ['log'],
    'controllerNamespace' => 'app\commands',
    'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
    'components' => [
        'cache' => $components['cache'],
        'log' => $components['log'],
        'db' => $components['db'],
    ],
    'modules' => $apps,
    'params' => $params,
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationTable' => 'migrate',
        ],
    ]
];
